package cn.zhentao.controller;

import cn.zhentao.common.Result;
import cn.zhentao.service.TCardService;
import cn.zhentao.service.TEducationService;
import cn.zhentao.user.pojo.TCard;
import cn.zhentao.user.pojo.TEducation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("cardeduit")
public class CardandEduitContro {
    @Autowired
    private TCardService tCardService; //卡的
    @Autowired
    private TEducationService educationService; //学历

    //卡片查询所有
    @GetMapping("cardlist")
    public Result cardlist(){
        List<TCard> list = tCardService.list();
        return Result.OK(list);
    }
    //学历查询所有
    @GetMapping("eduitlist")
    public Result eduitlist(){
        List<TEducation> list = educationService.list();
        return Result.OK(list);
    }

}
